# 设置最低的 CMake 版本要求
cmake_minimum_required(VERSION 3.10)
# 设置项目名称和语言
project(camera_http CXX)
# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# 设置编译器地址
set(COMPILER "/usr/bin/g++" )

# 设置输出路径
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build)


# 指定源文件
file(GLOB SOURCES "${PROJECT_SOURCE_DIR}/src/*.cpp")
# 添加可执行文件 
add_executable(${PROJECT_NAME} ${SOURCES} 
"${PROJECT_SOURCE_DIR}/include/mainWindow.hpp")
# 查找 OpenCV 和 QT6 库，头文件自动添加 
find_package(OpenCV REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS Widgets )
# 链接 OpenCV 库和Qt6 的 Widgets 模块
target_link_libraries(${PROJECT_NAME} PRIVATE ${OpenCV_LIBS})
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Widgets)


# 设置头文件的搜索路径
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include)

